<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title>Kogbox</title>
  <link href="/stylesheets/default.css?1198046247" media="screen" rel="Stylesheet" type="text/css" />
  <link href="/stylesheets/sIFR-screen.css?1198017364" media="screen" rel="Stylesheet" type="text/css" />
  <script src="/javascripts/sifr.js" type="text/javascript"></script>
  <script type="text/javascript" charset="utf-8">
  	if(typeof sIFR == "function"){
	    sIFR.replaceElement("h2.metabook", named({sFlashSrc: "/metabold.swf", sColor: "#3A5A9A"}));
	};
  </script>
</head>
<body>

<div id="header">
<a href="/"><img src="/images/logo-3.png" /></a>
<div class="links">
	<a href="/">home</a> | 
	<a href="/about">about</a> | 
	<a href="/examples">examples</a> | 
	<a href="/view/all">snippets</a> | 
	<a href="/docs">docs</a> | 
	<a href="http://blog.kogbox.com">blog</a> | 
	<a href="/search">search</a>
	
</div>
</div>

<div id="content" class="paragraph">

<h1>Documentation</h1>

<p>Kogbox uses <b>only PHP, JavaScript, and plain HTML/XHTML</b> for the time being... be patient! We intend to include other languages such as Ruby, Python, and more. </p>

<h2>Kogbox functions:</h2>

<h4><em>include_snippet($user_id,$method_name [,$version])</em></h4>

<p>Use this function to include other snippets' code in your own. We encourage users to write functions or classes so that their code may be reused by others.</p>

<p>To tie yours to a specific version (so that changes don't break your snippet), specify a version number. Otherwise it defaults to the most recent version.</p>

<!-- <h4><em>get_my_url([$version])</em></h4>

<p>This returns the "run" URL of the current snippet, in the format "http://run.kogbox.com/&lt;language&gt;/?u=&lt;foo&gt;&amp;m=&lt;bar&gt;" where &lt;language&gt; is the snippet's language (e.g. php), &lt;foo&gt; is the user_id and &lt;bar&gt; is the method_name.</p>
	
<p>This may be revised in the future to use mod_rewrite, but the get_my_url() function will always return the correct URL. </p>

<p>By default it returns the version number of the current snippet. If you supply a version number it will return that version; if you supply "latest" (e.g. get_my_url("latest")) it will return the latest.</p> -->

<h4><em>get_snippet_info($user_id,$method_name [,$version])</em></h4>

<p>Call this function to get a key/value array of information about the requested snippet... IF that snippet is public. Available information includes "version" (version #), "description", "total_use" (a tally of how many times that version has been run), "license_id", "ancestor_id", and more.</p>

<p>See <a href="http://www.kogbox.com/view/latest/1.get_snippet_info">this example</a> for all the available fields, and sample code.</p>

</div>

<div id="footer">
<br />
<br />
<div class="links">
	<a href="/">home</a> | 
	<a href="/about">about</a> | 
	<a href="/examples">examples</a> | 
	<a href="/view/all">snippets</a> | 
	<a href="/docs">docs</a> | 
	<a href="http://blog.kogbox.com">blog</a> | 
	<a href="/search">search</a>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write("\<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" );
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-180781-22");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>